<extend name="template/base_index" />

<block name="area_header">
    <link rel="stylesheet" href="__CSS__/addre_manage.css">
</block>

<block name="area_body">
    <div class="main_content">
        <volist name="addr" id="vo">
            <div class="weui_cells mr_dz">
                <div class="weui_cell buy_addre">
                    <div class="buy_addre">
                        <div class="buy_shr"><span>收货人：{$vo['contactname']}</span><span class="buy_tel">{$vo['mobile']}</span></div>
                        <div class="buy_dzx"><span class="buy_nrd">收货地址：</span><div class="buy_rdz">{$vo['province']}{$vo['city']}{$vo['area']}{$vo['detailinfo']}</div></div>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd">
                        <if condition="$d_addr == $vo['id']">
                            <span class="addre_default"><a alt="{:U('Customization/checkout',array('addressid' => $vo['id']))}" class="set_addre"><i class="fa fa-check-circle-o"></i></a>默认地址</span>
                            <else />
                            <a alt="{:U('Customization/checkout',array('addressid' => $vo['id']))}" class="set_addre"><i class="fa fa-circle-o"></i></a>
                        </if>
                    </div>

                </div>
            </div>
        </volist>
    </div>
    <script src="__JS__/jquery-weui.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $(".set_addre").bind("click", function() {
                var id = $(this).attr('alt');
                $.confirm("您确定要选择该地址为收货地址?", "确认", function() {
                    location.href = id;
                }, function() {
                    //取消操作
                });
            });
        });
    </script>
</block>